/* Turska Framework/UI library (Turs2)
 * Copyright 2003-2009 Jetro Lauha
 * All rights reserved.
 * Web: http://iki.fi/jetro/turska/
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of EITHER:
 *   (1) The GNU Lesser General Public License as published by the Free
 *       Software Foundation; either version 2.1 of the License, or (at
 *       your option) any later version. The text of the GNU Lesser
 *       General Public License is included with this library in the
 *       file LICENSE-LGPL.txt.
 *   (2) The BSD-style license that is included with this library in
 *       the file LICENSE-BSD.txt.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
 * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
 *
 * $Id: T2Graphics.h 131 2009-06-05 05:58:05Z jlauha $
 * $Revision: 131 $
 */

#ifndef T2GRAPHICS_H_INCLUDED
#define T2GRAPHICS_H_INCLUDED


namespace turska
{
    class Image;
    
    //! Abstract interface for UI graphics handling.
    class Graphics
    {
    public:
    
        Graphics() {}
        virtual ~Graphics() {}
        
        //! Performs any necessary tasks to begin rendering of UI components.
        virtual void beginRender() = 0;
        //! Ends rendering of UI components.
        virtual void endRender() = 0;

        //! Sets the default flags for image loading.
        /*!
         * Default flags are set to be IF_DEFAULT_FLAGS by default.
         * \sa turska::IMAGE_FLAG
         */
        virtual void setDefaultFlags(UI32 flags) = 0;
        
        //! Loads an image with a given file name.
        /*!
         * \param fileName file name of image to load.
         * \param flags image flags to use when loading image. \sa turska::IMAGE_FLAG
         * \return image object if successful, or 0 if unsuccessful.
         */
        virtual Image * loadImage(const C8 *fileName,
                                  UI32 flags = G_USE_DEFAULT_FLAGS) = 0;
        
    }; // class Graphics

} // namespace turska


#endif // !T2GRAPHICS_H_INCLUDED
